---------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/code/logs/table_
> 03_phi_vs_z_rca.log
  log type:  text
 opened on:  28 Nov 2022, 07:03:18

. *-------------------------------------------------------------------------------
. 
. 
. 
. 
. *---------------------------------------------          
. *Output per worker 
. *---------------------------------------------
. use "${data}/aggregates_tfp_lp_klems_agg.dta", clear 

. keep year isocode ln_ctfp ln_gdp_pw_ppp 

. duplicates drop 

Duplicates in terms of all variables

(2,510 observations deleted)

. tempfile base0

. save `base0', replace 
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_000026.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_000026.tmp saved

. 
. use "${data}/aggregates_tfp_lp_klems_agg.dta", clear 

. keep year isocode type ln_LP_ppp_emp_pwt

. rename ln_LP_ppp_emp_pwt ln_lp_

. reshape wide ln_lp_ , i( year isocode ) j(type) string
(note: j = manuf market nonmarket others serv total)

Data                               long   ->   wide
-----------------------------------------------------------------------------
Number of obs.                     3012   ->     502
Number of variables                   4   ->       8
j variable (6 values)              type   ->   (dropped)
xij variables:
                                 ln_lp_   ->   ln_lp_manuf ln_lp_market ... ln_lp_total
-----------------------------------------------------------------------------

. duplicates drop 

Duplicates in terms of all variables

(0 observations are duplicates)

. tempfile base1

. save `base1', replace 
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_000027.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_000027.tmp saved

. 
. use `base0', clear

. merge 1:1 isocode year using `base1'

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                               502  (_merge==3)
    -----------------------------------------

. drop _merge 

. keep if year==2016 
(463 observations deleted)

. tempfile productivity_agg

. save `productivity_agg', replace 
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_000028.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_000028.tmp saved

. 
. 
. use "${data}/aggregates_tfp_lp_klems.dta", clear 

. keep year isocode type sector1 sector ln_LP_ppp_emp_pwt

. rename ln_LP_ppp_emp_pwt ln_lp_sec

. duplicates drop 

Duplicates in terms of all variables

(0 observations are duplicates)

. merge m:1 isocode year using `productivity_agg'
(note: variable year was int, now double to accommodate using data's values)
(note: variable isocode was str2, now str32 to accommodate using data's values)

    Result                           # of obs.
    -----------------------------------------
    not matched                        11,540
        from master                    11,540  (_merge==1)
        from using                          0  (_merge==2)

    matched                               972  (_merge==3)
    -----------------------------------------

. keep if _merge==3
(11,540 observations deleted)

. drop _merge

. tempfile productivity

. save `productivity', replace 
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_000029.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_000029.tmp saved

. 
.         
.                 
. *---------------------------------------------
. *Outward Multinational*
. *---------------------------------------------
. use "${data}/klems_oecd_unido_orbis_sales_emp_exp.dta", clear

. keep year isocode  sector1 sector GO_usd_mnc_out

. keep if isocode=="DK" | isocode=="JP" | isocode=="IT" | isocode=="KR" | isocode=="DE" | isocode=="FR" | isocode=="ES" |  isocode=="MX" |  isocode
> =="GB" |  isocode=="PL" |  isocode=="GR" |  isocode=="NL" |  isocode=="RO" |  isocode=="BE" |  isocode=="AT" |  isocode=="PT" |  isocode=="FI" | 
>  isocode=="SE" |  isocode=="CZ" |  isocode=="SK" |  isocode=="BG" |  isocode=="HU" |  isocode=="HR" |  isocode=="LV" |  isocode=="SI" |  isocode=
> ="LT" |  isocode=="EE" 
(4,095 observations deleted)

. keep if year==2016
(8,100 observations deleted)

. drop if isocode=="KR" | isocode=="MX" 
(50 observations deleted)

. 
. gen GO_manuf= GO_usd_mnc_out if sector1=="Manufacturing (C)"
(482 missing values generated)

. gen GO_serv= GO_usd_mnc_out if sector1=="Market_Services (G-H-I-J-K-M-N-R-S-T)"
(471 missing values generated)

. gen GO_tot= GO_usd_mnc_out if sector1=="Total (TOT)"
(603 missing values generated)

. gen GO_market= GO_usd_mnc_out if sector1=="Market (MARKT)"
(603 missing values generated)

. drop if sector1=="Non-Market Economy"
(125 observations deleted)

. rename GO_usd_mnc_out GO_sec

. 
. gen GO_sec_fr=GO_sec if isocode=="FR"
(480 missing values generated)

. by year sector, sort: egen xx_max=max(GO_sec_fr)

. gen ln_ratio=ln(GO_sec/xx_max)
(75 missing values generated)

. drop GO_sec_fr GO_sec xx_max

. rename ln_ratio GO_sec

. 
. foreach ii in GO_manuf GO_serv GO_tot GO_market {
  2. display "`ii'"
  3. by year isocode, sort: egen xx=max(`ii')
  4. drop `ii'
  5. rename xx `ii'
  6. 
. gen `ii'_fr=`ii' if isocode=="FR"
  7. by year, sort: egen xx_max=max(`ii'_fr)
  8. gen ln_ratio=ln(`ii'/xx_max)
  9. drop `ii'_fr `ii' xx_max
 10. rename ln_ratio `ii'
 11. }
GO_manuf
(60 missing values generated)
(480 missing values generated)
(60 missing values generated)
GO_serv
(60 missing values generated)
(480 missing values generated)
(60 missing values generated)
GO_tot
(60 missing values generated)
(480 missing values generated)
(60 missing values generated)
GO_market
(60 missing values generated)
(480 missing values generated)
(60 missing values generated)

. *
. 
. drop if sector==sector1
(125 observations deleted)

. merge 1:1 isocode year sector using `productivity'
(note: variable year was int, now double to accommodate using data's values)
(note: variable isocode was str2, now str32 to accommodate using data's values)

    Result                           # of obs.
    -----------------------------------------
    not matched                           597
        from master                         0  (_merge==1)
        from using                        597  (_merge==2)

    matched                               375  (_merge==3)
    -----------------------------------------

. drop if _merge==2
(597 observations deleted)

. drop _merge

. tempfile out_mnc

. save `out_mnc', replace 
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_00002a.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_00002a.tmp saved

. 
. 
. *Only aggregates* 
. *------------------------------------------
. use `out_mnc', clear

. keep year isocode  GO_manuf GO_serv GO_tot GO_market

. duplicates drop

Duplicates in terms of all variables

(350 observations deleted)

. merge 1:1 isocode year using `productivity_agg'

    Result                           # of obs.
    -----------------------------------------
    not matched                            14
        from master                         0  (_merge==1)
        from using                         14  (_merge==2)

    matched                                25  (_merge==3)
    -----------------------------------------

. drop if _merge==2
(14 observations deleted)

. drop _merge

. tempfile out_mnc_sec

. save `out_mnc_sec', replace
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_00002b.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_00002b.tmp saved

. 
. 
. 
. *---------------------------------------------
. *PHI*
. *---------------------------------------------
. local nn=10 

. *minimum number of sectors allowed per year-isocode*/
. local yy=2016

. clear all

. use "${data}/estimates_sec_naics_sales_s1_base_woparent.dta", clear

. keep if year==`yy'
(4,828 observations deleted)

. rename DA D_A

. drop if D_A==. | (D_A==0 & isocode!="FR")
(1 observation deleted)

. tab type

       type |      Freq.     Percent        Cum.
------------+-----------------------------------
      manuf |        162       34.03       34.03
  nonmarket |         74       15.55       49.58
     others |         78       16.39       65.97
       serv |        162       34.03      100.00
------------+-----------------------------------
      Total |        476      100.00

. 
. keep isocode year type sector1 sector D_A

. rename D_A D_A_sec

. merge m:1 year isocode using "${data}/estimates_agg_naics_sales_s1_base_woparent.dta", keepusing(D_A)
(note: variable year was int, now float to accommodate using data's values)

    Result                           # of obs.
    -----------------------------------------
    not matched                           296
        from master                         0  (_merge==1)
        from using                        296  (_merge==2)

    matched                               476  (_merge==3)
    -----------------------------------------

. rename D_A D_A_agg

. drop if _merge==2
(296 observations deleted)

. drop _merge

. merge m:1 year isocode type using "${data}/estimates_aggtype_naics_sales_s1_base_woparent.dta", keepusing(D_A)

    Result                           # of obs.
    -----------------------------------------
    not matched                            74
        from master                        74  (_merge==1)
        from using                          0  (_merge==2)

    matched                               402  (_merge==3)
    -----------------------------------------

. rename D_A D_A_type

. drop if _merge==2
(0 observations deleted)

. drop _merge

. 
. gen D_A_manuf=D_A_type if sector1=="Manufacturing (C)"
(314 missing values generated)

. gen D_A_serv=D_A_type if sector1=="Market_Services (G-H-I-J-K-M-N-R-S-T)"
(314 missing values generated)

. gen D_A_others=D_A_type if sector1=="Other_Goods (A-B-D-E-F)"
(399 missing values generated)

. rename D_A_agg D_A_tot

. drop D_A_type

. 
. foreach ii in D_A_manuf D_A_serv D_A_others  {
  2. display "`ii'"
  3. by year isocode, sort: egen xx=max(`ii')
  4. drop `ii'
  5. rename xx `ii'
  6. }
D_A_manuf
D_A_serv
D_A_others
(15 missing values generated)

. *
. 
. *Bring MNC information
. *-------------------------------- 
. merge 1:1 year isocode sector using `out_mnc'
(note: variable year was float, now double to accommodate using data's values)
(note: variable isocode was str2, now str32 to accommodate using data's values)
(note: variable sector was str26, now str37 to accommodate using data's values)

    Result                           # of obs.
    -----------------------------------------
    not matched                           107
        from master                       104  (_merge==1)
        from using                          3  (_merge==2)

    matched                               372  (_merge==3)
    -----------------------------------------

. keep if _merge==3
(107 observations deleted)

. drop _merge

. 
. gen D_A_tot_phi=(-1)*D_A_tot*(0.2)

. gen b_D_A_tot_phi_`grvar0'=ln_gdp_pw_ppp - D_A_tot_phi 

. 
. gen D_A_manuf_phi=(-1)*D_A_manuf*(0.2)

. gen b_D_A_manuf_phi_`grvar0'=ln_lp_manuf - D_A_manuf_phi

. 
. gen D_A_serv_phi=(-1)*D_A_serv*(0.2)

. gen b_D_A_serv_phi_`grvar0'=ln_lp_serv - D_A_serv_phi

. 
. gen D_A_sec_phi=(-1)*D_A_sec*(0.2)

. gen b_D_A_sec_phi_`grvar0'=ln_lp_sec - D_A_sec_phi

. 
. drop D_A_sec D_A_tot D_A_manuf D_A_serv D_A_others 

. tempfile table3

. save `table3', replace
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_00002c.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_354_00002c.tmp saved

. 
. 
. 
. *Table 3
. *-----------------------------------------------
. use `table3', clear

. local tt tot

. gen rhs1=D_A_sec_phi- D_A_`tt'_phi

. gen rhs2=b_D_A_sec_phi- b_D_A_`tt'_phi

. gen lhs= GO_sec-GO_`tt'
(59 missing values generated)

. 
. local LHS lhs 

. local RHS1 rhs1

. local RHS2 rhs2

. drop if `LHS'==.
(59 observations deleted)

. 
. gen ss=1

. local abslist "ss"

. 
. 
. *All sectors
. *-------------------------------------------------------------
. reghdfe `LHS' `RHS1', abs(`abslist')  vce(cluster isocode sector)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        313
Absorbing 1 HDFE group                            F(   1,     14) =      15.93
Statistics robust to heteroskedasticity           Prob > F        =     0.0013
                                                  R-squared       =     0.0726
                                                  Adj R-squared   =     0.0696
Number of clusters (isocode) =         22         Within R-sq.    =     0.0726
Number of clusters (sector)  =         15         Root MSE        =     1.3821

                        (Std. Err. adjusted for 15 clusters in isocode sector)
------------------------------------------------------------------------------
             |               Robust
         lhs |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        rhs1 |   2.627099   .6582693     3.99   0.001     1.215252    4.038947
       _cons |  -.5530301   .1693433    -3.27   0.006    -.9162354   -.1898249
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
          ss |         1           0           1     |
-----------------------------------------------------+

. outreg2 using "${rmain}/table_03.xls", br ctitle(OLS, type: "all sectors") append 
F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_03.xls
dir : seeout

. reghdfe `LHS' `RHS2', abs(`abslist')  vce(cluster isocode sector)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        313
Absorbing 1 HDFE group                            F(   1,     14) =       0.13
Statistics robust to heteroskedasticity           Prob > F        =     0.7267
                                                  R-squared       =     0.0010
                                                  Adj R-squared   =    -0.0022
Number of clusters (isocode) =         22         Within R-sq.    =     0.0010
Number of clusters (sector)  =         15         Root MSE        =     1.4345

                        (Std. Err. adjusted for 15 clusters in isocode sector)
------------------------------------------------------------------------------
             |               Robust
         lhs |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        rhs2 |   .1672528   .4689406     0.36   0.727    -.8385248     1.17303
       _cons |  -.6312335   .1848107    -3.42   0.004    -1.027613   -.2348539
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
          ss |         1           0           1     |
-----------------------------------------------------+

. outreg2 using "${rmain}/table_03.xls", br ctitle(OLS, type: "all sectors") append 
F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_03.xls
dir : seeout

. reghdfe `LHS' `RHS1' `RHS2', abs(`abslist')  vce(cluster isocode sector)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        313
Absorbing 1 HDFE group                            F(   2,     14) =       7.76
Statistics robust to heteroskedasticity           Prob > F        =     0.0054
                                                  R-squared       =     0.0943
                                                  Adj R-squared   =     0.0885
Number of clusters (isocode) =         22         Within R-sq.    =     0.0943
Number of clusters (sector)  =         15         Root MSE        =     1.3680

                        (Std. Err. adjusted for 15 clusters in isocode sector)
------------------------------------------------------------------------------
             |               Robust
         lhs |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        rhs1 |   3.227526   .8318345     3.88   0.002     1.443418    5.011633
        rhs2 |   .8325303   .5008349     1.66   0.119    -.2416538    1.906714
       _cons |  -.6135146   .1691473    -3.63   0.003    -.9762994   -.2507298
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
          ss |         1           0           1     |
-----------------------------------------------------+

. outreg2 using "${rmain}/table_03.xls", br ctitle(OLS, type: "all sectors") append 
F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_03.xls
dir : seeout

. 
. *Manufacturing 
. *-------------------------------------------------------------
. reghdfe `LHS' `RHS1' if type=="manuf", abs(`abslist')  vce(cluster isocode sector)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        121
Absorbing 1 HDFE group                            F(   1,      5) =       9.49
Statistics robust to heteroskedasticity           Prob > F        =     0.0275
                                                  R-squared       =     0.1367
                                                  Adj R-squared   =     0.1295
Number of clusters (isocode) =         22         Within R-sq.    =     0.1367
Number of clusters (sector)  =          6         Root MSE        =     1.4526

                         (Std. Err. adjusted for 6 clusters in isocode sector)
------------------------------------------------------------------------------
             |               Robust
         lhs |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        rhs1 |   4.102379   1.331708     3.08   0.027     .6791153    7.525644
       _cons |  -.4605505   .3245957    -1.42   0.215     -1.29495    .3738492
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
          ss |         1           0           1     |
-----------------------------------------------------+

. outreg2 using "${rmain}/table_03.xls", br ctitle(OLS, type: "manuf") append 
F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_03.xls
dir : seeout

. reghdfe `LHS' `RHS2' if type=="manuf", abs(`abslist')  vce(cluster isocode sector)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        121
Absorbing 1 HDFE group                            F(   1,      5) =       2.66
Statistics robust to heteroskedasticity           Prob > F        =     0.1638
                                                  R-squared       =     0.0555
                                                  Adj R-squared   =     0.0476
Number of clusters (isocode) =         22         Within R-sq.    =     0.0555
Number of clusters (sector)  =          6         Root MSE        =     1.5194

                         (Std. Err. adjusted for 6 clusters in isocode sector)
------------------------------------------------------------------------------
             |               Robust
         lhs |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        rhs2 |   1.509011   .9250475     1.63   0.164    -.8688996    3.886921
       _cons |  -.4738749   .3315263    -1.43   0.212     -1.32609    .3783405
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
          ss |         1           0           1     |
-----------------------------------------------------+

. outreg2 using "${rmain}/table_03.xls", br ctitle(OLS, type: "manuf") append 
F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_03.xls
dir : seeout

. reghdfe `LHS' `RHS1' `RHS2' if type=="manuf", abs(`abslist')  vce(cluster isocode sector)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        121
Absorbing 1 HDFE group                            F(   2,      5) =      12.97
Statistics robust to heteroskedasticity           Prob > F        =     0.0105
                                                  R-squared       =     0.2737
                                                  Adj R-squared   =     0.2614
Number of clusters (isocode) =         22         Within R-sq.    =     0.2737
Number of clusters (sector)  =          6         Root MSE        =     1.3380

                         (Std. Err. adjusted for 6 clusters in isocode sector)
------------------------------------------------------------------------------
             |               Robust
         lhs |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        rhs1 |   5.457607   1.084599     5.03   0.004     2.669557    8.245656
        rhs2 |   2.496171   .8218529     3.04   0.029     .3835305    4.608811
       _cons |  -.4344407   .2685585    -1.62   0.167    -1.124792    .2559108
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
          ss |         1           0           1     |
-----------------------------------------------------+

. outreg2 using "${rmain}/table_03.xls", br ctitle(OLS, type: "manuf") append 
F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_03.xls
dir : seeout

. 
. *Services 
. *-------------------------------------------------------------
. reghdfe `LHS' `RHS1' if type=="serv", abs(`abslist')  vce(cluster isocode sector)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        132
Absorbing 1 HDFE group                            F(   1,      5) =      12.05
Statistics robust to heteroskedasticity           Prob > F        =     0.0178
                                                  R-squared       =     0.0640
                                                  Adj R-squared   =     0.0568
Number of clusters (isocode) =         22         Within R-sq.    =     0.0640
Number of clusters (sector)  =          6         Root MSE        =     1.3206

                         (Std. Err. adjusted for 6 clusters in isocode sector)
------------------------------------------------------------------------------
             |               Robust
         lhs |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        rhs1 |   3.105481   .8946831     3.47   0.018     .8056251    5.405337
       _cons |  -.6614182   .2288872    -2.89   0.034    -1.249792   -.0730448
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
          ss |         1           0           1     |
-----------------------------------------------------+

. outreg2 using "${rmain}/table_03.xls", br ctitle(OLS, type: "serv") append 
F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_03.xls
dir : seeout

. reghdfe `LHS' `RHS2' if type=="serv", abs(`abslist')  vce(cluster isocode sector)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        132
Absorbing 1 HDFE group                            F(   1,      5) =       2.10
Statistics robust to heteroskedasticity           Prob > F        =     0.2073
                                                  R-squared       =     0.0230
                                                  Adj R-squared   =     0.0155
Number of clusters (isocode) =         22         Within R-sq.    =     0.0230
Number of clusters (sector)  =          6         Root MSE        =     1.3492

                         (Std. Err. adjusted for 6 clusters in isocode sector)
------------------------------------------------------------------------------
             |               Robust
         lhs |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        rhs2 |  -.7626946   .5267739    -1.45   0.207     -2.11681    .5914207
       _cons |  -.5583874   .2771335    -2.01   0.100    -1.270782     .154007
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
          ss |         1           0           1     |
-----------------------------------------------------+

. outreg2 using "${rmain}/table_03.xls", br ctitle(OLS, type: "serv") append 
F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_03.xls
dir : seeout

. reghdfe `LHS' `RHS1' `RHS2' if type=="serv", abs(`abslist')  vce(cluster isocode sector)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        132
Absorbing 1 HDFE group                            F(   2,      5) =       8.10
Statistics robust to heteroskedasticity           Prob > F        =     0.0270
                                                  R-squared       =     0.0651
                                                  Adj R-squared   =     0.0507
Number of clusters (isocode) =         22         Within R-sq.    =     0.0651
Number of clusters (sector)  =          6         Root MSE        =     1.3249

                         (Std. Err. adjusted for 6 clusters in isocode sector)
------------------------------------------------------------------------------
             |               Robust
         lhs |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        rhs1 |   2.879429   .8036673     3.58   0.016     .8135363    4.945322
        rhs2 |  -.1913217   .6479104    -0.30   0.780    -1.856829    1.474185
       _cons |  -.6318414   .2904308    -2.18   0.082    -1.378418    .1147347
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
          ss |         1           0           1     |
-----------------------------------------------------+

. outreg2 using "${rmain}/table_03.xls", br ctitle(OLS, type: "serv") append 
F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_03.xls
dir : seeout

. *------------------------------------
. 
. log close 
      name:  <unnamed>
       log:  F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/code/logs/table_
> 03_phi_vs_z_rca.log
  log type:  text
 closed on:  28 Nov 2022, 07:03:23
---------------------------------------------------------------------------------------------------------------------------------------------------
